﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CnGine.Web;
using System.Data;

public partial class ascx_Language : ControlBase
{

    public int TypeID = 0;
    public int ColorID = 0;
    public int Language = 0;

    protected void Page_Load(object sender, EventArgs e)
    {
        TypeID = base.QueryInt32("type");
        ColorID = base.QueryInt32("color");
        Language = base.QueryInt32("lang");
        if (!IsPostBack)
        {
            BindData();
        }
    }

    public void BindData()
    {
        DataSet ds = Comm.PublicType.getLanguage();
        this.Repeater1.DataSource = ds;
        this.Repeater1.DataBind();
    }

    public string GetCurr(object o)
    {
        int i = 0;
        if (o != null) int.TryParse(o.ToString(), out i);
        if (i == Language) return " class=\"b2\" ";
        else return "";
    }
}